package com.jiyici.data;

import java.util.ArrayList;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class Client2ServerSyncFeedback {
    
    public String tableName;
    
    public ArrayList<SimpleBaseModel> simpleBaseModelList;
    
    public void fromJson(JSONObject json) throws JSONException {
        tableName = json.getString("tableName");
        JSONArray rows = json.getJSONArray("rows");
        int size = rows.length();
        simpleBaseModelList = new ArrayList<SimpleBaseModel>(size + 1);
        for (int i = 0; i < size; i++) {
            JSONObject row = rows.getJSONObject(i);
            SimpleBaseModel model = new SimpleBaseModel();
            model.fromJson(row);
            simpleBaseModelList.add(model);
        }
    }
}
